home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11582 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.production.compuserve.com!news
  2. From: John Carlyle-Clarke <100615.2651@CompuServe.COM>
  3. Newsgroups: comp.lang.c++
  4. Subject: Error Handling in C++
  5. Date: 15 Mar 1996 11:09:05 GMT
  6. Organization: BPI Communications Ltd.
  7. Message-ID: <4ibj4h$l0i$1@mhafc.production.compuserve.com>
  8.  
  9. Can anyone offer any advice on the following problem?
  10.  
  11.   Previously, when using procedural languages, I developed an 
  12. error handling practice where all functions returned an int 
  13. value, zero being no error, and any other value being an error.  
  14. This would cause calling functions to break out and pass the 
  15. value up to the top level, where the error would be dealt with.  
  16. This is of course quite similar to the c++ exception mechanism.
  17. The only trouble is, my compiler doesnt support it.
  18.  
  19. As an ex C programmer grappling with OOD, I have looked for 
  20. examples of ways to handle errors, but all the texts and example 
  21. code I have skips error handling pretty much altogether
  22.  
  23. I know I could use MFC, but I don't like it, and my code has been 
  24. developed without it.
  25. What I need is for someone to suggest a good method for error 
  26. handling without inbuilt exceptions that reflects the object 
  27. oriented nature of the language, or a way of simulating 
  28. exceptions like the MFC does.
  29.  
  30. Any help, recommendations or advice greatly appreciated.
  31.  
  32.     John Carlyle-Clarke
  33.